package com.example.dormitory_system.service;

import com.example.dormitory_system.domain.dto.sysuser.RegisterDTO;
import com.example.dormitory_system.domain.dto.tsysuser.ListDTO;
import com.example.dormitory_system.domain.dto.tsysuser.UserInfoUpdateDTO;
import com.example.dormitory_system.domain.enetiy.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.dormitory_system.domain.vo.student.SysUserListVO;
import com.example.dormitory_system.domain.vo.sysuser.SysLoginVO;
import com.example.dormitory_system.domain.vo.tsysuser.TeacherVO;
import com.example.dormitory_system.domain.vo.tsysuser.UserInfoVO;
import com.example.dormitory_system.domain.vo.tsysuser.UserVO;
import com.example.dormitory_system.domain.vo.user.LoginVO;

import java.util.List;

/**
* @author keenan
* @description 针对表【tb_user(用户表)】的数据库操作Service
* @createDate 2025-03-26 15:31:46
*/
public interface UserService extends IService<User> {

    /**
     * 用户登录
     * @param username 用户名
     * @param password 密码
     * @return -1=用户不存在, -2=密码错误, 1=学生, 2=一级管理员, 3=二级管理员
     */
    SysLoginVO login(String username, String password);


    int register(RegisterDTO registerDTO);

//This method returns a list of UserVO objects based on the given status
    List<UserVO> sysListUser(ListDTO listDTO);

    UserInfoVO sysUserInfo(Long userId);

    int sysUserInfoUpdate(UserInfoUpdateDTO userInfoUpdateDTO);

    TeacherVO searchTeacher(String teacherName);


    List<SysUserListVO> listUser(String name);
    Boolean resetpassoword(Long userId,String oldPassword,String newPassword);
}